import request from "@/axios";

// 添加套保账户
export const addhedgeaccount = option =>
  request({
    url: "/api/autohedge/addhedgeaccount",
    method: "post",
    data: option
  });

// 获取套保账户列表
export const gethedgeaccountlist = option =>
  request({
    url: "/api/autohedge/gethedgeaccountlist",
    method: "get",
    params: option
  });

// 获取套保配置列表
export const getcompanyhedgeconfiglist = option =>
  request({
    url: "/api/autohedge/getcompanyhedgeconfiglist",
    method: "get",
    params: option
  });

// 获取交易所和合约信息
export const getexchangefutures = option =>
  request({
    url: "/api/autohedge/getexchangefutures",
    method: "get",
    params: option
  });

// 更新套保账户
export const updatehedgeaccount = option =>
  request({
    url: "/api/autohedge/updatehedgeaccount",
    method: "post",
    data: option
  });

// 添加套保规则
export const addcompanyhedgeconfig = option =>
  request({
    url: "/api/autohedge/addcompanyhedgeconfig",
    method: "post",
    data: option
  });

// 获取期货公司信息
export const getfuturescompanys = option =>
  request({
    url: "/api/autohedge/getfuturescompanys",
    method: "get",
    params: option
  });

// 删除指定套保账号
export const deletehedgeaccount = option =>
  request({
    url: "/api/autohedge/deletehedgeaccount",
    method: "get",
    params: option
  });

// 套保账户登录
export const hedgeaccountlogin = option =>
  request({
    url: "/api/autohedge/hedgeaccountlogin",
    method: "get",
    params: option
  });

// 修改套保配置
export const updatecompanyhedgeconfig = option =>
  request({
    url: "/api/autohedge/updatecompanyhedgeconfig",
    method: "post",
    data: option
  });

// 全局配置暂停
export const disableallconfig = option =>
  request({
    url: "/api/autohedge/disableallconfig",
    method: "get",
    params: option
  });

// 全局配置启动
export const enableallconfig = option =>
  request({
    url: "/api/autohedge/enableallconfig",
    method: "get",
    params: option
  });

// 冻结指定配置
export const freezeconfig = option =>
  request({
    url: "/api/autohedge/freezeconfig",
    method: "get",
    params: option
  });

// 启用指定配置
export const enableconfig = option =>
  request({
    url: "/api/autohedge/enableconfig",
    method: "get",
    params: option
  });

// 停用指定配置
export const disableconig = option =>
  request({
    url: "/api/autohedge/disableconig",
    method: "get",
    params: option
  });

// 删除指定配置
export const deleteconfig = option =>
  request({
    url: "/api/autohedge/deleteconfig",
    method: "get",
    params: option
  });

// 查询指定套保配置
export const querycompanyhedgeconfig = option =>
  request({
    url: "/api/autohedge/querycompanyhedgeconfig",
    method: "get",
    params: option
  });
